Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Argument (complex analysis)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Argument_(complex_analysis)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Argument_complex_analysis rootpage-Argument_complex_analysis skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Argument (complex analysis)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Argument_of_a_function" title="Argument of a function">Argument of a function</a>.</div>
<div role="note" class="hatnote navigation-not-searchable">For other uses, see <a href="Argument_(disambiguation)" class="mw-disambig" title="Argument (disambiguation)">Argument (disambiguation)</a>.</div>

<p>In <a href="Mathematics" title="Mathematics">mathematics</a> (particularly in <a href="Complex_analysis" title="Complex analysis">complex analysis</a>), the <b>argument</b> of a complex number <span class="texhtml mvar" style="font-style:italic;">z</span>, denoted <span class="texhtml">arg(<i>z</i>)</span>, is the <a href="Angle" title="Angle">angle</a> between the positive <a href="Real_number" title="Real number">real</a> <a href="Cartesian_coordinate_system" title="Cartesian coordinate system">axis</a> and the line joining the origin and <span class="texhtml mvar" style="font-style:italic;">z</span>, represented as a point in the <a href="Complex_plane" title="Complex plane">complex plane</a>, shown as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> in Figure&nbsp;1. By convention the positive real axis is drawn pointing rightward, the positive <a href="Imaginary_number" title="Imaginary number">imaginary</a> axis is drawn pointing upward, and complex numbers with positive real part are considered to have an <a href="Anticlockwise" class="mw-redirect" title="Anticlockwise">anticlockwise</a> argument with positive sign.
</p><p>When any real-valued angle is considered, the argument is a <a href="Multivalued_function" title="Multivalued function">multivalued function</a> operating on the nonzero <a href="Complex_number" title="Complex number">complex numbers</a>. The <a href="Principal_value" title="Principal value">principal value</a> of this function is single-valued, typically chosen to be the unique value of the argument that lies within the interval <span class="texhtml">(−<i>π</i>, <i>π</i>]</span>.<sup id="cite_ref-:1_1-0" class="reference"><a href="#cite_note-:1-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> In this article the multi-valued function will be denoted <span class="texhtml">arg(<i>z</i>)</span> and its principal value will be denoted <span class="texhtml">Arg(<i>z</i>)</span>, but in some sources the capitalization of these symbols is exchanged.
</p><p>In some older mathematical texts, the term "amplitude" was used interchangeably with argument to denote the angle of a complex number. This usage is seen in older references such as <a href="Lars_Ahlfors" title="Lars Ahlfors">Lars Ahlfors</a>' <i>Complex Analysis: An introduction to the theory of analytic functions of one complex variable</i> (1979), where amplitude referred to the argument of a complex number. While this term is largely outdated in modern texts, it still appears in some regional educational resources, where it is sometimes used in introductory-level textbooks.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2></div>

<p>An <b>argument</b> of the nonzero complex number <span class="texhtml"><i>z</i> = <i>x</i> + <i>iy</i></span>, denoted <span class="texhtml">arg(<i>z</i>)</span>, is defined in two equivalent ways:
</p>
<ol><li>Geometrically, in the <a href="Complex_plane" title="Complex plane">complex plane</a>, as the <a href="2D_polar_angle" class="mw-redirect" title="2D polar angle">2D polar angle</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> from the positive real axis to the vector representing <span class="texhtml mvar" style="font-style:italic;">z</span>. The numeric value is given by the angle in <a href="Radian" title="Radian">radians</a>, and is positive if measured counterclockwise.</li>
<li>Algebraically, as any real quantity <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> such that <span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z=r(\cos \varphi +i\sin \varphi )=re^{i\varphi }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>z</mi>
<mo>=</mo>
<mi>r</mi>
<mo stretchy="false">(</mo>
<mi>cos</mi>
<mo>⁡<!-- ⁡ --></mo>
<mi>φ<!-- φ --></mi>
<mo>+</mo>
<mi>i</mi>
<mi>sin</mi>
<mo>⁡<!-- ⁡ --></mo>
<mi>φ<!-- φ --></mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>r</mi>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mi>φ<!-- φ --></mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z=r(\cos \varphi +i\sin \varphi )=re^{i\varphi }}</annotation>
</semantics>
</math></span></span> for some positive real <span class="texhtml mvar" style="font-style:italic;">r</span> (see <a href="Euler's_formula" title="Euler's formula">Euler's formula</a>). The quantity <span class="texhtml mvar" style="font-style:italic;">r</span> is the <i><a href="Absolute_value" title="Absolute value">modulus</a></i> (or absolute value) of <span class="texhtml mvar" style="font-style:italic;">z</span>, denoted |<span class="texhtml mvar" style="font-style:italic;">z</span>|: <span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r={\sqrt {x^{2}+y^{2}}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<msup>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>+</mo>
<msup>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</msqrt>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r={\sqrt {x^{2}+y^{2}}}.}</annotation>
</semantics>
</math></span></span></li></ol>
<p>The argument of zero is usually left undefined. The names <i><a href="Magnitude_(mathematics)" title="Magnitude (mathematics)">magnitude</a>,</i> for the modulus, and <i><a href="Phase_(waves)" title="Phase (waves)">phase</a></i>,<sup id="cite_ref-phase_4-0" class="reference"><a href="#cite_note-phase-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:1_1-1" class="reference"><a href="#cite_note-:1-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> for the argument, are sometimes used equivalently.
</p><p>Under both definitions, it can be seen that the argument of any non-zero complex number has many possible values: firstly, as a geometrical angle, it is clear that whole circle rotations do not change the point, so angles differing by an integer multiple of <span class="texhtml">2π</span> <a href="Radian" title="Radian">radians</a> (a complete <a href="Turn_(angle)" title="Turn (angle)">turn</a>) are the same, as reflected by figure 2 on the right. Similarly, from the <a href="Periodic_function" title="Periodic function">periodicity</a> of <a href="Sine" class="mw-redirect" title="Sine"><span class="texhtml">sin</span>
</a> and <a href="Cosine" class="mw-redirect" title="Cosine"><span class="texhtml">cos</span></a>, the second definition also has this property.
</p>
<div class="mw-heading mw-heading2"><h2 id="Principal_value">Principal value</h2></div>

<p>Because a complete rotation around the origin leaves a complex number unchanged, there are many choices which could be made for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> by circling the origin any number of times. This is shown in figure&nbsp;2, a representation of the <a href="Multi-valued" class="mw-redirect" title="Multi-valued">multi-valued</a> (set-valued) function <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(x,y)=\arg(x+iy)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>i</mi>
<mi>y</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle f(x,y)=\arg(x+iy)}</annotation>
</semantics>
</math></span><img src="./6049f730c95e6590d293e888ac49a0ab74e8c063.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.879ex; height:2.843ex;" alt="{\displaystyle f(x,y)=\arg(x+iy)}" loading="lazy"></span>, where a vertical line (not shown in the figure) cuts the surface at heights representing all the possible choices of angle for that point.
</p><p>When a <a href="Well-defined" class="mw-redirect" title="Well-defined">well-defined</a> function is required, then the usual choice, known as the <i><a href="Principal_value" title="Principal value">principal value</a></i>, is the value in the open-closed <a href="Interval_(mathematics)" title="Interval (mathematics)">interval</a> <span class="texhtml">(−<i>π</i>, <i>π</i>]</span> radians, that is from <span class="texhtml">−<i>π</i></span> to <span class="texhtml"><i>π</i></span> <a href="Radian" title="Radian">radians</a> excluding <span class="texhtml">−<i>π</i></span> radians itself (equiv., from −180 to +180 <a href="Degree_(angle)" title="Degree (angle)">degrees</a>, excluding −180° itself). This represents an angle of up to half a complete circle from the positive real axis in either direction.
</p><p>Some authors define the range of the principal value as being in the closed-open interval <span class="texhtml">[0, 2<i>π</i>)</span>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Notation">Notation</h3></div>
<p>The principal value sometimes has the initial letter capitalized, as in <span class="texhtml">Arg <i>z</i></span>, especially when a general version of the argument is also being considered. Note that notation varies, so <span class="texhtml">arg</span> and <span class="texhtml">Arg</span> may be interchanged in different texts.
</p><p>The set of all possible values of the argument can be written in terms of <span class="texhtml">Arg</span> as:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arg(z)=\{\operatorname {Arg} (z)+2\pi n\mid n\in \mathbb {Z} \}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mo fence="false" stretchy="false">{</mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mn>2</mn>
<mi>π<!-- π --></mi>
<mi>n</mi>
<mo>∣<!-- ∣ --></mo>
<mi>n</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mo fence="false" stretchy="false">}</mo>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \arg(z)=\{\operatorname {Arg} (z)+2\pi n\mid n\in \mathbb {Z} \}.}</annotation>
</semantics>
</math></span><img src="./82d2b27912d8fadb28dfaa5d9861672948d071a5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.371ex; height:2.843ex;" alt="{\displaystyle \arg(z)=\{\operatorname {Arg} (z)+2\pi n\mid n\in \mathbb {Z} \}.}" loading="lazy"></span></dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Computing_from_the_real_and_imaginary_part">Computing from the real and imaginary part</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Atan2" title="Atan2">atan2</a></div>
<p>If a complex number is known in terms of its real and imaginary parts, then the function that calculates the principal value <span class="texhtml">Arg</span> is called the <a href="Atan2" title="Atan2">two-argument arctangent function, <span class="texhtml">atan2</span></a>:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>i</mi>
<mi>y</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>atan2</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>y</mi>
<mo>,</mo>
<mspace width="thinmathspace"></mspace>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)}</annotation>
</semantics>
</math></span><img src="./615606c03da439a0de75ffcd3cbfc5aed549cb8c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:26.253ex; height:2.843ex;" alt="{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)}" loading="lazy"></span>.</dd></dl>
<p>The <span class="texhtml">atan2</span> function is available in the math libraries of many programming languages, sometimes under a different name, and usually returns a value in the range <span class="texhtml">(−π, π]</span>.<sup id="cite_ref-:1_1-2" class="reference"><a href="#cite_note-:1-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>In some sources the argument is defined as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} (x+iy)=\arctan(y/x),}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>i</mi>
<mi>y</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>arctan</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>x</mi>
<mo stretchy="false">)</mo>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} (x+iy)=\arctan(y/x),}</annotation>
</semantics>
</math></span><img src="./73b1002a1c281cbe01847170a09ffb33ffe61271.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:27.423ex; height:2.843ex;" alt="{\displaystyle \operatorname {Arg} (x+iy)=\arctan(y/x),}" loading="lazy"></span> however this is correct only when <span class="texhtml"><i>x</i> &gt; 0</span>, where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y/x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle y/x}</annotation>
</semantics>
</math></span><img src="./c6ed5f4b5088118c3e87c080b87fd36b749d4902.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.648ex; height:2.843ex;" alt="{\displaystyle y/x}" loading="lazy"></span> is well-defined and the angle lies between <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle -{\tfrac {\pi }{2}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mstyle>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle -{\tfrac {\pi }{2}}}</annotation>
</semantics>
</math></span><img src="./67a19acfb376df2a06f33d08ca28752fd43cb686.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:3.586ex; height:3.176ex;" alt="{\displaystyle -{\tfrac {\pi }{2}}}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tfrac {\pi }{2}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mstyle>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\tfrac {\pi }{2}}.}</annotation>
</semantics>
</math></span><img src="./4ab0b2f1f3a87ca54207a40e27b3c196b5a1b89f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:2.425ex; height:3.176ex;" alt="{\displaystyle {\tfrac {\pi }{2}}.}" loading="lazy"></span> Extending this definition to cases where <span class="texhtml"><i>x</i></span> is not positive is relatively involved. Specifically, one may define the principal value of the argument separately on the half-plane <span class="texhtml"><i>x</i> &gt; 0</span> and the two quadrants with <span class="texhtml"><i>x</i> &lt; 0</span>, and then patch the definitions together:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)={\begin{cases}\arctan \left({\frac {y}{x}}\right)&amp;{\text{if }}x>0,\\[5mu]\arctan \left({\frac {y}{x}}\right)+\pi &amp;{\text{if }}x<0{\text{ and }}y\geq 0,\\[5mu]\arctan \left({\frac {y}{x}}\right)-\pi &amp;{\text{if }}x<0{\text{ and }}y<0,\\[5mu]+{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y>0,\\[5mu]-{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y<0,\\[5mu]{\text{undefined}}&amp;{\text{if }}x=0{\text{ and }}y=0.\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>i</mi>
<mi>y</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>atan2</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>y</mi>
<mo>,</mo>
<mspace width="thinmathspace"></mspace>
<mi>x</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing="0.478em 0.478em 0.478em 0.478em 0.478em 0.2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mi>arctan</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>y</mi>
<mi>x</mi>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>&gt;</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>arctan</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>y</mi>
<mi>x</mi>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>+</mo>
<mi>π<!-- π --></mi>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>&lt;</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>≥<!-- ≥ --></mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>arctan</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>y</mi>
<mi>x</mi>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>−<!-- − --></mo>
<mi>π<!-- π --></mi>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>&lt;</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>&lt;</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>&gt;</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>&lt;</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>undefined</mtext>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mn>0.</mn>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)={\begin{cases}\arctan \left({\frac {y}{x}}\right)&amp;{\text{if }}x&gt;0,\\[5mu]\arctan \left({\frac {y}{x}}\right)+\pi &amp;{\text{if }}x&lt;0{\text{ and }}y\geq 0,\\[5mu]\arctan \left({\frac {y}{x}}\right)-\pi &amp;{\text{if }}x&lt;0{\text{ and }}y&lt;0,\\[5mu]+{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y&gt;0,\\[5mu]-{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y&lt;0,\\[5mu]{\text{undefined}}&amp;{\text{if }}x=0{\text{ and }}y=0.\end{cases}}}</annotation>
</semantics>
</math></span><img src="./73bfbb35f671d62261506c3d87c7f98f36e0cfeb.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -10.838ex; width:67.538ex; height:22.843ex;" alt="{\displaystyle \operatorname {Arg} (x+iy)=\operatorname {atan2} (y,\,x)={\begin{cases}\arctan \left({\frac {y}{x}}\right)&amp;{\text{if }}x>0,\\[5mu]\arctan \left({\frac {y}{x}}\right)+\pi &amp;{\text{if }}x<0{\text{ and }}y\geq 0,\\[5mu]\arctan \left({\frac {y}{x}}\right)-\pi &amp;{\text{if }}x<0{\text{ and }}y<0,\\[5mu]+{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y>0,\\[5mu]-{\frac {\pi }{2}}&amp;{\text{if }}x=0{\text{ and }}y<0,\\[5mu]{\text{undefined}}&amp;{\text{if }}x=0{\text{ and }}y=0.\end{cases}}}" loading="lazy"></span></dd></dl>
<p>See <a href="Atan2" title="Atan2">atan2</a> for further detail and alternative implementations.
</p>
<div class="mw-heading mw-heading2"><h2 id="Realizations_of_the_function_in_computer_languages">Realizations of the function in computer languages</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Wolfram_language_(Mathematica)">Wolfram language (Mathematica)</h3></div>
<p>In Wolfram language, there's <code>Arg[z]</code>:<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p><code>Arg[x + y I]</code> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ={\begin{cases}{\text{undefined}}&amp;{\text{if }}|x|=\infty {\text{ and }}|y|=\infty ,\\[5mu]0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]0&amp;{\text{if }}x=\infty ,\\[5mu]\pi &amp;{\text{if }}x=-\infty ,\\[5mu]\pm {\frac {\pi }{2}}&amp;{\text{if }}y=\pm \infty ,\\[5mu]\operatorname {Arg} (x+yi)&amp;{\text{otherwise}}.\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing="0.478em 0.478em 0.478em 0.478em 0.478em 0.2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>undefined</mtext>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>π<!-- π --></mi>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>±<!-- ± --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mo>±<!-- ± --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>+</mo>
<mi>y</mi>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>otherwise</mtext>
</mrow>
<mo>.</mo>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ={\begin{cases}{\text{undefined}}&amp;{\text{if }}|x|=\infty {\text{ and }}|y|=\infty ,\\[5mu]0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]0&amp;{\text{if }}x=\infty ,\\[5mu]\pi &amp;{\text{if }}x=-\infty ,\\[5mu]\pm {\frac {\pi }{2}}&amp;{\text{if }}y=\pm \infty ,\\[5mu]\operatorname {Arg} (x+yi)&amp;{\text{otherwise}}.\end{cases}}}</annotation>
</semantics>
</math></span><img src="./3312c0b6fd0323590ac8284777895c42ca060d62.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -9.838ex; width:42.76ex; height:20.843ex;" alt="{\displaystyle ={\begin{cases}{\text{undefined}}&amp;{\text{if }}|x|=\infty {\text{ and }}|y|=\infty ,\\[5mu]0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]0&amp;{\text{if }}x=\infty ,\\[5mu]\pi &amp;{\text{if }}x=-\infty ,\\[5mu]\pm {\frac {\pi }{2}}&amp;{\text{if }}y=\pm \infty ,\\[5mu]\operatorname {Arg} (x+yi)&amp;{\text{otherwise}}.\end{cases}}}" loading="lazy"></span>
</p><p>or using the language's <code>ArcTan</code>:
</p><p><code>Arg[x + y I]</code> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ={\begin{cases}0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]{\text{ArcTan[x, y]}}&amp;{\text{otherwise}}.\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing="0.478em 0.2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mn>0</mn>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>ArcTan[x, y]</mtext>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>otherwise</mtext>
</mrow>
<mo>.</mo>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ={\begin{cases}0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]{\text{ArcTan[x, y]}}&amp;{\text{otherwise}}.\end{cases}}}</annotation>
</semantics>
</math></span><img src="./417935b528c9e6995c670956eb27b01108161b0c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:38.569ex; height:6.509ex;" alt="{\displaystyle ={\begin{cases}0&amp;{\text{if }}x=0{\text{ and }}y=0,\\[5mu]{\text{ArcTan[x, y]}}&amp;{\text{otherwise}}.\end{cases}}}" loading="lazy"></span>
</p><p><code>ArcTan[x, y]</code> is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {atan2} (y,x)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>atan2</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>y</mi>
<mo>,</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {atan2} (y,x)}</annotation>
</semantics>
</math></span><img src="./cdf144c1f1dccdc6c0949ece514a77f3790530f7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.013ex; height:2.843ex;" alt="{\displaystyle \operatorname {atan2} (y,x)}" loading="lazy"></span> extended to work with infinities. <code>ArcTan[0, 0]</code> is <code>Indeterminate</code> (i.e. it's <a href="Indeterminate_form" title="Indeterminate form">still</a> defined), while <code>ArcTan[Infinity, -Infinity]</code> doesn't return anything (i.e. it's <a href="Undefined_(mathematics)" title="Undefined (mathematics)">undefined</a>).
</p>
<div class="mw-heading mw-heading3"><h3 id="Maple">Maple</h3></div>
<p><a href="Maple_(software)" title="Maple (software)">Maple</a>'s <code>argument(z)</code> behaves the same as <code>Arg[z]</code> in Wolfram language, except that <code>argument(z)</code> also returns <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>π<!-- π --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi }</annotation>
</semantics>
</math></span><img src="./9be4ba0bb8df3af72e90a0535fabcc17431e540a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:1.676ex;" alt="{\displaystyle \pi }" loading="lazy"></span> if <code>z</code> is the special floating-point value <code>−0.</code>.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
Also, Maple doesn't have <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {atan2} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>atan2</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {atan2} }</annotation>
</semantics>
</math></span><img src="./474078eadf601ac09d580227d85df6f4e16e747f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.685ex; height:2.176ex;" alt="{\displaystyle \operatorname {atan2} }" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading3"><h3 id="MATLAB">MATLAB</h3></div>
<p><a href="MATLAB" title="MATLAB">MATLAB</a>'s <code>angle(z)</code> behaves<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> the same as <code>Arg[z]</code> in Wolfram language, except that it is
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{cases}{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=-\infty ,\\[5mu]{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=-\infty .\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing="0.478em 0.478em 0.478em 0.2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>1</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>1</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>3</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>3</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<mi>y</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>.</mo>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{cases}{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=-\infty ,\\[5mu]{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=-\infty .\end{cases}}}</annotation>
</semantics>
</math></span><img src="./9a307c8b014a10f796f164859b966cebd0878694.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.671ex; width:33.989ex; height:16.509ex;" alt="{\displaystyle {\begin{cases}{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {1\pi }{4}}&amp;{\text{if }}x=\infty {\text{ and }}y=-\infty ,\\[5mu]{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=\infty ,\\[5mu]-{\frac {3\pi }{4}}&amp;{\text{if }}x=-\infty {\text{ and }}y=-\infty .\end{cases}}}" loading="lazy"></span>
</p><p>Unlike in Maple and Wolfram language, MATLAB's <code>atan2(y, x)</code> is equivalent to <code>angle(x + y*1i)</code>. That is, <code>atan2(0, 0)</code> is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0}</annotation>
</semantics>
</math></span><img src="./2aae8864a3c1fec9585261791a809ddec1489950.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Identities">Identities</h2></div>
<p>One of the main motivations for defining the principal value <span class="texhtml">Arg</span> is to be able to write complex numbers in modulus-argument form. Hence for any complex number <span class="texhtml mvar" style="font-style:italic;">z</span>,
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z=\left|z\right|e^{i\operatorname {Arg} z}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>z</mi>
<mo>=</mo>
<mrow>
<mo>|</mo>
<mi>z</mi>
<mo>|</mo>
</mrow>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mi>z</mi>
</mrow>
</msup>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z=\left|z\right|e^{i\operatorname {Arg} z}.}</annotation>
</semantics>
</math></span><img src="./487f2f489ffaa83e9545f23ff27eee6e58efd86a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.728ex; height:3.176ex;" alt="{\displaystyle z=\left|z\right|e^{i\operatorname {Arg} z}.}" loading="lazy"></span></dd></dl>
<p>This is only really valid if <span class="texhtml mvar" style="font-style:italic;">z</span> is non-zero, but can be considered valid for <span class="texhtml"><i>z</i> = 0</span> if <span class="texhtml">Arg(0)</span> is considered as an <a href="Indeterminate_form" title="Indeterminate form">indeterminate form</a>—rather than as being undefined.
</p><p>Some further identities follow. If <span class="texhtml"><i>z</i><sub>1</sub></span> and <span class="texhtml"><i>z</i><sub>2</sub></span> are two non-zero complex numbers, then
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\operatorname {Arg} (z_{1}z_{2})&amp;\equiv \operatorname {Arg} (z_{1})+\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }},\\\operatorname {Arg} \left({\frac {z_{1}}{z_{2}}}\right)&amp;\equiv \operatorname {Arg} (z_{1})-\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mtd>
<mtd>
<mi></mi>
<mo>≡<!-- ≡ --></mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">R</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mo stretchy="false">)</mo>
</mrow>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi></mi>
<mo>≡<!-- ≡ --></mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">R</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mo stretchy="false">)</mo>
</mrow>
<mo>.</mo>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\operatorname {Arg} (z_{1}z_{2})&amp;\equiv \operatorname {Arg} (z_{1})+\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }},\\\operatorname {Arg} \left({\frac {z_{1}}{z_{2}}}\right)&amp;\equiv \operatorname {Arg} (z_{1})-\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./5869cd72017513b0bf5468b9008fc9275f9bb534.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:49.64ex; height:9.176ex;" alt="{\displaystyle {\begin{aligned}\operatorname {Arg} (z_{1}z_{2})&amp;\equiv \operatorname {Arg} (z_{1})+\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }},\\\operatorname {Arg} \left({\frac {z_{1}}{z_{2}}}\right)&amp;\equiv \operatorname {Arg} (z_{1})-\operatorname {Arg} (z_{2}){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.\end{aligned}}}" loading="lazy"></span></dd></dl>
<p>If <span class="texhtml"><i>z</i> ≠ 0</span> and <span class="texhtml mvar" style="font-style:italic;">n</span> is any integer, then<sup id="cite_ref-:1_1-3" class="reference"><a href="#cite_note-:1-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} \left(z^{n}\right)\equiv n\operatorname {Arg} (z){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow>
<mo>(</mo>
<msup>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo>)</mo>
</mrow>
<mo>≡<!-- ≡ --></mo>
<mi>n</mi>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">R</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mo stretchy="false">)</mo>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} \left(z^{n}\right)\equiv n\operatorname {Arg} (z){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.}</annotation>
</semantics>
</math></span><img src="./fffb4e908c318516e46321ea5e363d0e68bf34cd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:36.746ex; height:2.843ex;" alt="{\displaystyle \operatorname {Arg} \left(z^{n}\right)\equiv n\operatorname {Arg} (z){\pmod {\mathbb {R} /2\pi \mathbb {Z} }}.}" loading="lazy"></span></dd></dl>
<div class="mw-heading mw-heading3"><h3 id="Example">Example</h3></div>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} {\biggl (}{\frac {-1-i}{i}}{\biggr )}=\operatorname {Arg} (-1-i)-\operatorname {Arg} (i)=-{\frac {3\pi }{4}}-{\frac {\pi }{2}}=-{\frac {5\pi }{4}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-OPEN">
<mo maxsize="2.047em" minsize="2.047em">(</mo>
</mrow>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mi>i</mi>
</mrow>
<mi>i</mi>
</mfrac>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-CLOSE">
<mo maxsize="2.047em" minsize="2.047em">)</mo>
</mrow>
</mrow>
<mo>=</mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>3</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>π<!-- π --></mi>
<mn>2</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>5</mn>
<mi>π<!-- π --></mi>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} {\biggl (}{\frac {-1-i}{i}}{\biggr )}=\operatorname {Arg} (-1-i)-\operatorname {Arg} (i)=-{\frac {3\pi }{4}}-{\frac {\pi }{2}}=-{\frac {5\pi }{4}}}</annotation>
</semantics>
</math></span><img src="./2e12244732fbc962ec086a87d93a51b3be724743.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:61.166ex; height:6.176ex;" alt="{\displaystyle \operatorname {Arg} {\biggl (}{\frac {-1-i}{i}}{\biggr )}=\operatorname {Arg} (-1-i)-\operatorname {Arg} (i)=-{\frac {3\pi }{4}}-{\frac {\pi }{2}}=-{\frac {5\pi }{4}}}" loading="lazy"></span></dd></dl>
<div class="mw-heading mw-heading3"><h3 id="Using_the_complex_logarithm">Using the complex logarithm</h3></div>
<p>From <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z=|z|e^{i\operatorname {Arg} (z)}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>z</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z=|z|e^{i\operatorname {Arg} (z)}}</annotation>
</semantics>
</math></span><img src="./bf533ccaaf75e063203aea2642b8f179ca188584.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.587ex; height:3.343ex;" alt="{\displaystyle z=|z|e^{i\operatorname {Arg} (z)}}" loading="lazy"></span>, we get <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i\operatorname {Arg} (z)=\ln {\frac {z}{|z|}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>ln</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>z</mi>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i\operatorname {Arg} (z)=\ln {\frac {z}{|z|}}}</annotation>
</semantics>
</math></span><img src="./85197ca04913e8f76e8cc284d882c0e0c44870ca.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:16.547ex; height:5.509ex;" alt="{\displaystyle i\operatorname {Arg} (z)=\ln {\frac {z}{|z|}}}" loading="lazy"></span>, alternatively <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Arg} (z)=\operatorname {Im} (\ln {\frac {z}{|z|}})=\operatorname {Im} (\ln z)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>Im</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>ln</mi>
<mo>⁡<!-- ⁡ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>z</mi>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>Im</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>ln</mi>
<mo>⁡<!-- ⁡ --></mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Arg} (z)=\operatorname {Im} (\ln {\frac {z}{|z|}})=\operatorname {Im} (\ln z)}</annotation>
</semantics>
</math></span><img src="./1404c3f57d4066485ee01a55d89fb5f7fc6820e3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:31.04ex; height:5.509ex;" alt="{\displaystyle \operatorname {Arg} (z)=\operatorname {Im} (\ln {\frac {z}{|z|}})=\operatorname {Im} (\ln z)}" loading="lazy"></span>. As we are taking the imaginary part, any normalisation by a real scalar will not affect the result. This is useful when one has the <a href="Complex_logarithm" title="Complex logarithm">complex logarithm</a> available.
</p>
<div class="mw-heading mw-heading2"><h2 id="Extended_argument">Extended argument</h2></div>
<p>The extended argument of a number z (denoted as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overline {\arg }}(z)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mi>arg</mi>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\overline {\arg }}(z)}</annotation>
</semantics>
</math></span><img src="./aea67ef662802c5b14aab3072336d2fce4bae769.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.249ex; height:2.843ex;" alt="{\displaystyle {\overline {\arg }}(z)}" loading="lazy"></span>) is the set of all real numbers congruent to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arg(z)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \arg(z)}</annotation>
</semantics>
</math></span><img src="./5d8bb9d3cf9c1a82f1666e4e72b6702b0cee4b21.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.134ex; height:2.843ex;" alt="{\displaystyle \arg(z)}" loading="lazy"></span> modulo 2<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>π<!-- π --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi }</annotation>
</semantics>
</math></span><img src="./9be4ba0bb8df3af72e90a0535fabcc17431e540a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:1.676ex;" alt="{\displaystyle \pi }" loading="lazy"></span>.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overline {\arg }}(z)=\arg(z)+2k\pi ,\forall k\in \mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mi>arg</mi>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>arg</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>z</mi>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mn>2</mn>
<mi>k</mi>
<mi>π<!-- π --></mi>
<mo>,</mo>
<mi mathvariant="normal">∀<!-- ∀ --></mi>
<mi>k</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\overline {\arg }}(z)=\arg(z)+2k\pi ,\forall k\in \mathbb {Z} }</annotation>
</semantics>
</math></span></span>
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-:1-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:1_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:1_1-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFWeisstein" class="citation web cs1">Weisstein, Eric W. <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/ComplexArgument.html">"Complex Argument"</a>. <i>mathworld.wolfram.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-31</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://mas-coursebuild.ncl.ac.uk/lti/content/ASK/default/core_mathematics/pure_maths/algebra/complex_numbers/modulus_and_argument/index.html">"Modulus and Argument"</a>. <i>mas-coursebuild.ncl.ac.uk</i>. <a href="Newcastle_University" title="Newcastle University">Newcastle University</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-01-05</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://byjus.com/jee/complex-numbers/#modulus-and-argument-of-a-complex-number">"Modulus and Argument of a Complex Number"</a>. <i>Byju's</i><span class="reference-accessdate">. Retrieved <span class="nowrap">18 January</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-phase-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-phase_4-0">^</a></b></span> <span class="reference-text">Dictionary of Mathematics (2002). <i>phase</i>.</span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://reference.wolfram.com/language/ref/Arg.html">"Arg"</a>. <i>Wolfram Language Documentation</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-08-30</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.maplesoft.com/support/help/Maple/view.aspx?path=argument">"Argument - Maple Help"</a>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.mathworks.com/help/matlab/ref/angle.html">"Phase angle - MATLAB angle"</a>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.mathworks.com/help/matlab/ref/atan2.html">"Four-quadrant inverse tangent - MATLAB atan2"</a>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.cut-the-knot.org/arithmetic/algebra/ComplexNumbers.shtml">"Algebraic Structure of Complex Numbers"</a>. <i>www.cut-the-knot.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-08-29</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Bibliography">Bibliography</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */


.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}


/* end https://en.wikipedia.org/ */
</style><div class="refbegin" style="">
<ul><li><cite id="CITEREFAhlfors1979" class="citation book cs1">Ahlfors, Lars (1979). <i>Complex Analysis: An Introduction to the Theory of Analytic Functions of One Complex Variable</i> (3rd&nbsp;ed.). New York;London: McGraw-Hill. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-07-000657-1</bdi>.</cite></li>
<li><cite id="CITEREFPonnuswamy2005" class="citation book cs1">Ponnuswamy, S. (2005). <i>Foundations of Complex Analysis</i> (2nd&nbsp;ed.). New Delhi;Mumbai: Narosa. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-81-7319-629-4</bdi>.</cite></li>
<li><cite id="CITEREFBeardon1979" class="citation book cs1">Beardon, Alan (1979). <i>Complex Analysis: The Argument Principle in Analysis and Topology</i>. Chichester: Wiley. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-471-99671-8</bdi>.</cite></li>
<li><cite id="CITEREFBorowskiBorwein2002" class="citation book cs1">Borowski, Ephraim; Borwein, Jonathan (2002) [1st ed. 1989 as <i>Dictionary of Mathematics</i>]. <i>Mathematics</i>. Collins Dictionary (2nd&nbsp;ed.). Glasgow: <a href="HarperCollins" title="HarperCollins">HarperCollins</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-00-710295-X</bdi>.</cite></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="https://www.encyclopediaofmath.org/index.php/Argument"><i>Argument</i></a> at <a href="Encyclopedia_of_Mathematics" title="Encyclopedia of Mathematics">Encyclopedia of Mathematics</a>.</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-03" href="https://en.wikipedia.org/wiki/?title=Argument_(complex_analysis)&amp;oldid=1304064700">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>